package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Scanner;

public class TestNote {
    public static void main(String[] args) throws IOException {
        Scanner scan=new Scanner(System.in);
        System.out.println("请输入文字");
        FileOutputStream tell= new FileOutputStream("note.txt");
        while(true){
            String  dell=scan.nextLine();
            if("exit".equals(dell)){
                break;
            }
            tell.write(dell.getBytes(StandardCharsets.UTF_8));
        }
        System.out.println("结束");
        tell.close();
    }
}
